﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Ev.Answer
{
    public partial class AnswerSuccess : Form
    {
        /// <summary>
        /// 份数排名字符串
        /// </summary>
        public string strNumber { get; set; }

        public AnswerSuccess()
        {
            InitializeComponent();
        }
        MP3Player mm3 = new MP3Player();
        private void AnswerSuccess_Load(object sender, EventArgs e)
        {
           
            mm3.FilePath = StaticData.soundcSuccess;
            mm3.Play();


            label1.Text = strNumber;

            timer1.Interval = 1000;
            timer1.Tick += Timer1_Tick;
            timer1.Start();
        }

        int stick = 15;
        private void Timer1_Tick(object sender, EventArgs e)
        {
            label2.Text = stick +"秒后自动关闭";
            stick--;
            if (stick<0)
            {
                timer1.Stop();
                mm3.Stop();
                this.Close();
            }
        }

        private void 返回ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
